Added GtkScrollablePolicy property to scrollable interface
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 26 Oct 2010 00:59:02 +0000 (09:59 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 26 Oct 2010 01:15:56 +0000 (10:15 +0900)
commit3fe0fb4ed95a3d5c51a049a24147e628e6965d62
tree0f1d9594d0dc787643509012cac76fe3871a6b5e
parent04c1337bdae99b2c45e44e20c9432a72e5e6602c
Added GtkScrollablePolicy property to scrollable interface

This patch adds the GtkScrollablePolicy type property to GtkScrollable
and implements it in all subclasses. GtkScrolledWindow observes this
property to make a good guess about when to show/hide scrollbars for
height-for-width content.

Most scrollable children do not do height-for-width *yet* but
most certainly will (toolpalette, treeview, iconview, textview
widgets all TODO), for scrollable widgets that do have a minimum
and natural size, it's important for them to observe the state
of this property in order to properly drive the scroll adjustments
according to the desired GtkScrollablePolicy. This patch makes
GtkViewport do this.

Patch also adds tests/testscrolledwindow.c to display the effects
of this property.
12 files changed:
gtk/gtkenums.h
gtk/gtkiconview.c
gtk/gtklayout.c
gtk/gtkscrollable.c
gtk/gtkscrollable.h
gtk/gtkscrolledwindow.c
gtk/gtktextview.c
gtk/gtktoolpalette.c
gtk/gtktreeprivate.h
gtk/gtktreeview.c
gtk/gtkviewport.c
tests/Makefile.am